<form action="index.php?top=page&option=com_frinformation" method="post" name="adminForm" id="adminForm" class="adminform">
<!-- LEFT -->
 <?php echo $this->loadTemplate('search','default') ?>
 <!-- END LEFT -->
 
 <!-- CONTENT -->
 <div id="jm-content">
    <h3 class="jm-title">
         <?php
            if($this->sr=='1')
            {
                echo '検索結果';
            }
            else echo '新着情報';
            ?>
    </h3>
                <?php
                    $rows=$this->rows;
                    if ($rows !=null)
                    {
                        foreach($rows as $row)
                        {
                ?>
                <div class="cc">
                    <h2>
                        <?php echo $row->CAIN_NAME; ?>  
                    </h2>

                    <table cellspacing="0" cellpadding="0" width="100%" border=0>  
                                <tbody>
                                    <?php
                                        
                                        if($row->data != null){  
                                        foreach($row->data as $k=>$data){   
                                    ?>
                                    <tr>
                                        <td class="col_1">
                                        
                                             <?php
                                                //$now = getdate(); 
                                                //echo $now;
                                                $c =date('Y/m/d'); 
                                                $a= $data->INFO_DATE;
                                                $a = date('Y/m/d', strtotime($a) );
                                                $d=strtotime($c)-strtotime($a);
                                                $num=$d/86400;
                                                $item=bgData::getNumNew();                             
                                                if ($num<=$item)
                                                    {
                                                        echo '<p class="icon-new">NEW!!</p>';
                                                        
                                                    }
                                                ?>
                                        
                                        </td>
                                        <td class="col_3" colspan="2"><a href="index.php?top=page&option=com_frinformation&task=detail&cid[0]=<?php echo $data->INFO_CODE; ?>"><?php echo $data->INFO_TITLE; ?></a></td>
                                        <td style="text-align: right;padding-right:5px;"><?php echo $data->INFO_DATE;  ?></td>
                                    </tr>
                                    <tr>
                                        <td colspan="5"><hr /></td>                        
                                    </tr>
                              
                                        <?php
                                                    }
                                                    ?>
                                     
                                        <?php 
                                            }
                                                else{
                                            ?>
                                                <tr>
                                                    <td class="center" colspan="5">データは見つかりませんでした</td>
                                                </tr>
                                    
                                            <?php    
                                            }
                                            ?>
                                            </tbody>
                                </table>
                        </div>
                                <?php
                                 
                                }
                            }
                                else
                                {
                                    ?>
                                    <table style="width: 100%;">
                                        <tr>
                                            <td class="center" colspan="5">データは見つかりませんでした</td>
                                        </tr>
                                    </table>
                                <?php    
                                }
                                 ?>
            <table style="margin: auto;">
                <tfoot>
        			<tr>
        				<td colspan="15" style="text-align: center;">
        				    <?php echo $this->pagination->getListFooter(); ?>	
                        </td>
        			</tr>
        		</tfoot>
            </table>
                
    <input type="hidden" name="task" value="">
	<input type="hidden" name="boxchecked" value="0">   
    
 </div>
 <!-- END RIGHT -->
 </form>
 
